package com.mbg17.service.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mbg17.dao.TaskReportMapper;
import com.mbg17.domain.TaskReport;
import com.mbg17.service.service.TaskReportService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 *
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class TaskReportServiceImpl extends ServiceImpl<TaskReportMapper, TaskReport>
        implements TaskReportService {
    @Resource
    private TaskReportMapper taskReportMapper;

    @Override
    public TaskReport addTaskReport(TaskReport taskReport) {
        taskReportMapper.insert(taskReport);
        return taskReport;
    }

    @Override
    public Boolean updateTaskReport(TaskReport taskReport) {
        return taskReportMapper.updateById(taskReport)==1;
    }
}
